<template>
	<view class="body">
		<u-navbar :title="title" :fixed="fixed" :autoBack="true"></u-navbar>
		<view class="content">
			<view v-html="data.content"></view>
		</view>
	</view>
</template>

<script>
	import user from '@/api/user';


	export default {
		data() {
			return {
				title: "",
				data: {}
			};
		},
		onLoad(o) {
			this.heightConfig = this.$store.getters.heightData;
			if (o.type == 1) {
				this.title = '本维美用户注册协议'
				this.getContent(o.type)
			} else if (o.type == 2) {
				this.title = '本维美隐私政策'
				this.getContent(o.type)
			}
		},
		methods: {
			getContent(row) {
				user.getContent().then((res) => {
					if (row == 1) {
						this.data = res.rows[2]
					} else if (row == 2) {
						this.data = res.rows[3]
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.body {
		width: 100%;
		height: 100%;
		background-color: #fff;
		overflow-y: auto;
	}

	.content {
		width: 100%;
		height: 100%;
		overflow-y: auto;
		background-color: #fff;
		background-color: #fff;
		padding: 30rpx;
		box-sizing: border-box;
	}
</style>